package com.qf.ssm.mapper;

import com.qf.ssm.pojo.Menu;
import com.qf.ssm.pojo.Menus;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface MenusMapper {

    @Select(("SELECT * from menu"))
    List<Menu> findAllMenus();

    @Select("SELECT * from menu where type=1")
    List<Menu> findAllLeftMenus();

    @Select("select * from menu where id in (select menu_id from role_menu rm where rm.role_id =#{rid})")
    List<Menu> findMenuByRoleId(Long rid);
}
